<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>评论管理</title>
<link type="text/css" rel="stylesheet" href="main.css"/>
<script src="jquery.js" language="javascript" type="text/javascript"></script>
<script src="base.js" language="javascript" type="text/javascript"></script>
<script language='javascript'>
//获得选中文件的文件名
function getCheckboxItem()
{
	var allSel="";
	if(document.feedback.fid.value) return document.feedback.fid.value;
	for(i=0;i<document.feedback.fid.length;i++)
	{
		if(document.feedback.fid[i].checked)
		{
			if(allSel=="")
				allSel=document.feedback.fid[i].value;
			else
				allSel=allSel+","+document.feedback.fid[i].value;
		}
	}
	return allSel;	
}
function selAll()
{
	for(i=0;i<document.feedback.fid.length;i++)
	{
		document.feedback.fid[i].checked=true;
	}
}
function selNone()
{
	for(i=0;i<document.feedback.fid.length;i++)
	{
		document.feedback.fid[i].checked=false;
	}
}
function selNor()
{
	for(i=0;i<document.feedback.fid.length;i++)
	{
		if(document.feedback.fid[i].checked==false)
			document.feedback.fid[i].checked=true;
		else
			document.feedback.fid[i].checked=false;
		
	}
}
function delFeedback()
{
	var qstr=getCheckboxItem();
	if(qstr=="") alert("你没选中任何内容！");
	else if(window.confirm('你确定要删除这些评论吗?')) location.href="feedback_main.php?job=del&fid="+qstr;
}
function delFeedbackIP()
{
	var qstr=getCheckboxItem();
	if(qstr=="") alert("你没选中任何内容！");
	else if(window.confirm('你确定要删除这些评论吗?')) location.href="feedback_main.php?job=delall&fid="+qstr;
}
function checkFeedback()
{
	var qstr=getCheckboxItem();
	if(qstr=="") alert("你没选中任何内容！");
	else location.href="feedback_main.php?job=check&fid="+qstr;
}
function editFeedback()
{
	var qstr=getCheckboxItem();
	if(qstr=="") alert("你没选中任何内容！");
	else location.href="feedback_edit.php?job=edit&fid="+qstr;
}
</script>

</head>
<body>
<div class="mtitle">
  <div class="lbox">评论管理</div>
</div>
<table class="tform">
  <tbody>
    <tr>
      <td></td>
      <td align="right"><form name='form1'>
          <strong>关键字:</strong>
          <input name='keyword' type='text' class="txt" style='width:150' size='15'>
          <select name="typeid" style="width:180">
            <option value="0">--请选择--</option>
            
 		{dede:global.openarray /}
	
          </select>
          <button type="submit" class="btn1">搜索</button>
      </form></td>
    </tr>
  </tbody>
</table>
<form name='feedback'>
<table _dlist="line check" class="tlist">
<thead>
  <tr>
    <td colspan="6"><div class="title"><strong>列表 - 评论</strong></div></td>
  </tr>
</thead>
<tbody>

{dede:datalist}
<tr>
  <th align="left">选择
    <input name="fid" type="checkbox" class="np" id="fid" value="{dede:field.id/}"></th>
  <th align="left">&nbsp;用户： {dede:field.username/}
    &nbsp;文档：<a href="{dede:global.cfg_phpurl /}/view.php?aid={dede:field.aid/}" target="_blank">{dede:field.arctitle/}</th>
  <th align="left">IP地址： {dede:field.ip/} </th>
  <th align="left"> &nbsp;时间： {dede:field.dtime function="GetDateTimeMK(@me)" /} </th>
  <th align="left"><a href='feedback_edit.php?id={dede:field.id/}'>[更改]</a></th>
</tr>
<tr class="">
  <td colspan="5"> 
    {dede:field.ischeck function="IsCheck(@me)" /}
        {dede:field.msg function='jstrim(@me,100)'/}  
</td>
  </tr>
{/dede:datalist}
</tbody>
<tfoot>
  <tr>
    <td colspan="6"><table class="tform">
      <tbody>
        <tr>
          <td align="left"><button type="button" class="btn1s" onClick="selAll()">全选</button>
          <button class="btn1s" type="button" onClick="selNone()">取消</button>
          <button type="button" class="btn1s" onClick="selNor()">反选</button>
          </td>
          <td align="right">
          <button type="button" class="btn1s" onClick="delFeedbackIP()">删除相同IP的所有评论</button>
          <button type="button" class="btn1s" onClick="delFeedback()">删除评论</button>
          <button type="button" class="btn1s" onClick="checkFeedback()">审核评论</button>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tfoot>
</table>
</form>
<div class="pagelist"> {dede:pagelist listsize='5' /}</div>
</body>
</html>